﻿package com.yy.ui.utils {
    import flash.geom.*;

    public class UniformScale {

        public static function scaleByWidth(_arg1:int, _arg2:int, _arg3:int):Number{
            return (((_arg2 / _arg1) * _arg3));
        }
        public static function scaleByHeight(_arg1:int, _arg2:int, _arg3:int):Number{
            return (((_arg1 / _arg2) * _arg3));
        }
        public static function scaleByBox(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Rectangle{
            var _local5:Number = Math.min((_arg3 / _arg1), (_arg4 / _arg2));
            var _local6:Rectangle = new Rectangle();
            _local6.width = (_arg1 * _local5);
            _local6.height = (_arg2 * _local5);
            return (_local6);
        }

    }
}